package cn.hnevc.xiaohui;
import java.util.Properties;
/*
 * 
 * System类的getProperties()方法，获取当前系统属性
 * 
 * 
 */

import java.util.Enumeration;
import java.util.Properties;

public class ExampleTest18 {
public static void main(String[] args) {
	Properties properties = System.getProperties();//获取当前系统属性
//获取所以系统属性的key 返回Enumeration对象
	Enumeration prNames = properties.propertyNames();

	while(prNames.hasMoreElements()){
		//获取系统属性的键key
		String key =(String) prNames.nextElement();
		String value =  System.getProperty(key);
		System.out.println(key + "--->" + value);
		
	}
}

}


